﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using RayDen.Library.Components.Surface;
using RayDen.Library.Core.Primitives;
using RayDen.Library.Entity.Scene;
using RayDen.SceneLab.UI;

namespace RayDen.SceneLab.Controllers.FormControllers
{
    public class MaterialEditFormController : FormControllerBase<MaterialEditForm>
    {
        public SurfaceBsdf Material { get; set; }
        public MaterialEditFormController(Form owner) : base(owner)
        {
            this.Material = new MatteMaterial(new RgbSpectrum(0.2f)) { MaterialData = new MaterialInfo() { Name = "@Default"} };
        }


        public void Select()
        {
            this.form.PropertyGrid.SelectedObject = Material;
            this.form.PropertyGrid.Text = Material.GetType().Name+" " + Material.Name;
        }
    }
}
